package com.ipet.app.adapter.ViewHolder;

import android.support.annotation.LayoutRes;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.ipet.app.R;
import com.ipet.app.bean.DisPlayImage;
import com.ipet.app.util.ImageUtil;
import com.jude.easyrecyclerview.adapter.BaseViewHolder;

/**
 * Created by jindongping on 16/3/18.
 */
public class MulImageViewHolder extends BaseViewHolder<DisPlayImage> {
    ImageView imageView;

    public MulImageViewHolder(ViewGroup parent, @LayoutRes int res) {
        super(parent, res);
        imageView = $(R.id.imageView);
    }

    @Override
    public void setData(DisPlayImage data) {
        super.setData(data);
        ImageUtil.getInstance(getContext()).disPalyWithReSize("m_" + data.getUrl(), imageView, data.getWidth(), data.getHeight());
    }
}
